package java_012_zuoye06;

public class Actors {
	private String name;
	private int age;
	private String sex;
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Actors(String name, int age, String sex) {
		super();
		this.name = name;
		this.age = age;
		this.sex = sex;
	}
	public Actors() {
		super();
	}
	
	public Actors(String str) {
		String[] split = str.split("-");
		this.name=split[0];
		this.age=Integer.parseInt(split[2]);
		this.sex=split[1];
		
	}
	@Override
	public String toString() {
		return "name=" + name + "";
	}
	
}
